package com.yeung.exam;

import java.util.Scanner;

public class 度小满_传送门 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int input[] = new int[n + 1];
        for (int i = 1; i < n + 1; i++) {
            input[i] = sc.nextInt();
        }
        boolean[] visited = new boolean[n + 1];
        //
        int cost = getCost(input, a, b, c, 1, visited);
        System.out.println(cost);


    }

    public static int getCost(int[] arr, int a, int b, int c, int city, boolean[] visited) {
        if (city == arr.length - 1) return 0;//到达目标城市
        //依次的城市
        int targetCity = arr[city];
        int cost1 = Integer.MAX_VALUE;
        if (!visited[city]) {
            visited[city] = true;
            cost1 = a + getCost(arr, a, b, c, targetCity, visited);
            visited[city]=false;
        }
        int cost2 = Integer.MAX_VALUE;
        if (arr[city] > 1) {
            arr[city] -= 1;
            if (!visited[city]) {
                visited[city] = true;
                cost2 = b + getCost(arr, a, b, c, city, visited);
            }
        }
        int cost3 = Integer.MAX_VALUE;
        if (arr[city] < arr.length - 1)//a[i]<n
        {
            //花费c费用
            arr[city] += 1;
            if (!visited[city]) {
                visited[city] = true;
                cost3 = c + getCost(arr, a, b, c, city, visited);
            }
        }

        return Math.min(cost1, Math.min(cost2, cost3));
    }
}
